<template>
  <div>
    <div class="course-box" >
      <div class="course-box-left">
        <div class="portrait">
          <van-image round cover :src="portrait[j][i]" />
        </div>
      </div>
      <div class="course-box-right" @click="goToCourseDetails">
        <div class="course-title">{{ CourseTitle[j][i] }}</div>
        <div class="course-innerbox">
          <div class="course-innerbox-left">
            <span class="course-name">{{ CourseName[j][i] }}&nbsp;|&nbsp;</span>
            <span class="course-time">{{ CourseTime[j][i] }}</span>
            <div class="course-label">
              <span class="course-label-u">{{ CourseLabel[j][i][0] }}</span>
              <span class="course-label-u">{{ CourseLabel[j][i][1] }}</span>
              <span class="course-label-u">{{ CourseLabel[j][i][2] }}</span>
            </div>
          </div>
          <div class="course-innerbox-right">
            <button>预约</button>
          </div>
        </div>
      </div>
    </div>
    <hr class="hr" />
  </div>
</template>

<script>
export default {
  name: 'Course',
  props: { j: Number, i: Number },
  data() {
    return {
      portrait: [
        [require('../assets/coach/哲里.jpg'), require('../assets/coach/小强jason.jpg'), require('../assets/coach/大丹 Big Dan.jpg')],
        [require('../assets/coach/大丹 Big Dan.jpg'), require('../assets/coach/Dawson.jpg'), require('../assets/coach/文润.jpg')],
        [require('../assets/coach/小强jason.jpg'), require('../assets/coach/文润.jpg'), require('../assets/coach/Dawson.jpg')],
        [require('../assets/coach/文润.jpg'), require('../assets/coach/哲里.jpg'), require('../assets/coach/大丹 Big Dan.jpg')],
        [require('../assets/coach/哲里.jpg'), require('../assets/coach/大丹 Big Dan.jpg'), require('../assets/coach/小强jason.jpg')]
      ],
      CourseTitle: [
        ['全身燃脂', 'LOVE STRENGTH核心雕塑 LOVEFITT', 'BODYPUMP莱美杠铃 LOVEFITT'],
        ['BODYPUMP莱美杠铃 LOVEFITT', 'LOVE WAVE 热力战绳 LOVEFITT', 'LOVE TRX悬吊塑形 LOVEFITT'],
        ['LOVE STRENGTH核心雕塑 LOVEFITT', 'LOVE TRX悬吊塑形 LOVEFITT', 'LOVE WAVE 热力战绳 LOVEFITT'],
        ['LOVE WAVE 热力战绳 LOVEFITT', '全身燃脂', 'BODYPUMP莱美杠铃 LOVEFITT'],
        ['全身燃脂', 'BODYPUMP莱美杠铃 LOVEFITT', 'LOVE STRENGTH核心雕塑 LOVEFITT']
      ],
      CourseName: [
        ['哲里', '小强 jason', '大丹 BIg Dan'],
        ['大丹 BIg Dan', 'Dawson', '文润'],
        ['小强 jason', '文润', 'Dawson'],
        ['文润', '哲里', '大丹 BIg Dan'],
        ['哲里', '大丹 BIg Dan', '小强 jason']
      ],
      CourseTime: [
        ['11:30-12:30', '12:30-13:30', '14:30-15:30'],
        ['11:30-12:30', '14:30-15:30', '18:10-19:10'],
        ['11:30-12:30', '14:30-15:30', '18:10-19:10'],
        ['12:30-13:30', '14:30-15:30', '18:10-19:10'],
        ['11:30-12:30', '12:30-13:30', '18:10-19:10']
      ],
      CourseLabel: [
        [
          ['低强度', 'LOVEFITT自研课', '适合新手'],
          ['中强度', 'LOVEFITT自研课', '马甲线'],
          ['中强度', 'LOVEFITT自研课', '减肥瘦身']
        ],
        [
          ['中强度', 'LOVEFITT自研课', '减肥瘦身'],
          ['中强度', 'LOVEFITT自研课', '减压'],
          ['高强度', 'LOVEFITT自研课', '高效燃脂']
        ],
        [
          ['中强度', 'LOVEFITT自研课', '马甲线'],
          ['高强度', 'LOVEFITT自研课', '高效燃脂'],
          ['中强度', 'LOVEFITT自研课', '减压']
        ],
        [
          ['高强度', 'LOVEFITT自研课', '高效燃脂'],
          ['低强度', 'LOVEFITT自研课', '适合新手'],
          ['中强度', 'LOVEFITT自研课', '减肥瘦身']
        ],
        [
          ['低强度', 'LOVEFITT自研课', '适合新手'],
          ['中强度', 'LOVEFITT自研课', '减肥瘦身'],
          ['中强度', 'LOVEFITT自研课', '马甲线']
        ]
      ]
    }
  },
  mounted() {},

  methods: {
    goToCourseDetails() {
      this.$router.push('/coursedetails')
    }
  }
}
</script>

<style lang="less" scoped>
.hr {
  position: absolute;
  left: 16%;
  width: 80%;
  margin: 0 auto;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.course-box {
  margin-top: 10px;
  display: flex;
  width: 344px;
  height: 94px;
  .course-box-left {
    flex: 0 1 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    .portrait {
      width: 44px;
      height: 44px;
    }
  }
  .course-box-right {
    width: 100%;
    .course-title {
      font-size: 14px;
      font-weight: 400;
      font-family: Georgia;
      margin-top: 10px;
    }
    .course-innerbox {
      height: 62px;
      display: flex;
      justify-content: space-between;
      .course-innerbox-left {
        width: 100%;
        .course-name {
          font-size: 10px;
          color: #999999;
        }
        .course-time {
          font-size: 10px;
          font-weight: 600;
          color: #ff6040;
        }
        .course-label-u {
          font-size: 10px;
          font-family: Georgia;
          color: #999999;
          padding: 2px 5px;
          margin-right: 2px;
          background-color: #f5f5f5;
        }
      }
      .course-innerbox-right {
        display: flex;
        justify-content: start;
        align-items: flex-end;
        color: #fff;
        flex: 0 1 32%;
        height: 54px;
        button {
          font-size: 16px;
          border: none;
          border-radius: 20px;
          background-color: #ff6040;
          padding: 5px 14px;
        }
      }
    }
  }
}
</style>
